package com.zhonghui.modlules.shop.eshopDomain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

@TableName("system_config")
public class SystemConfig implements Serializable {
    @TableId
    private Integer id;
    private String menuName;
    private String value;
    private Integer sort;
    private Integer status;

    public void copy(SystemConfig source) {
        BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
    }

    public SystemConfig() {
    }

    public Integer getId() {
        return this.id;
    }

    public String getMenuName() {
        return this.menuName;
    }

    public String getValue() {
        return this.value;
    }

    public Integer getSort() {
        return this.sort;
    }

    public Integer getStatus() {
        return this.status;
    }

    public void setId(final Integer id) {
        this.id = id;
    }

    public void setMenuName(final String menuName) {
        this.menuName = menuName;
    }

    public void setValue(final String value) {
        this.value = value;
    }

    public void setSort(final Integer sort) {
        this.sort = sort;
    }

    public void setStatus(final Integer status) {
        this.status = status;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof SystemConfig)) {
            return false;
        } else {
            SystemConfig other = (SystemConfig)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label71: {
                    Object this$id = this.getId();
                    Object other$id = other.getId();
                    if (this$id == null) {
                        if (other$id == null) {
                            break label71;
                        }
                    } else if (this$id.equals(other$id)) {
                        break label71;
                    }

                    return false;
                }

                Object this$sort = this.getSort();
                Object other$sort = other.getSort();
                if (this$sort == null) {
                    if (other$sort != null) {
                        return false;
                    }
                } else if (!this$sort.equals(other$sort)) {
                    return false;
                }

                label57: {
                    Object this$status = this.getStatus();
                    Object other$status = other.getStatus();
                    if (this$status == null) {
                        if (other$status == null) {
                            break label57;
                        }
                    } else if (this$status.equals(other$status)) {
                        break label57;
                    }

                    return false;
                }

                Object this$menuName = this.getMenuName();
                Object other$menuName = other.getMenuName();
                if (this$menuName == null) {
                    if (other$menuName != null) {
                        return false;
                    }
                } else if (!this$menuName.equals(other$menuName)) {
                    return false;
                }

                Object this$value = this.getValue();
                Object other$value = other.getValue();
                if (this$value == null) {
                    if (other$value == null) {
                        return true;
                    }
                } else if (this$value.equals(other$value)) {
                    return true;
                }

                return false;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof SystemConfig;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $id = this.getId();
        result = result * 59 + ($id == null ? 43 : $id.hashCode());
        Object $sort = this.getSort();
        result = result * 59 + ($sort == null ? 43 : $sort.hashCode());
        Object $status = this.getStatus();
        result = result * 59 + ($status == null ? 43 : $status.hashCode());
        Object $menuName = this.getMenuName();
        result = result * 59 + ($menuName == null ? 43 : $menuName.hashCode());
        Object $value = this.getValue();
        result = result * 59 + ($value == null ? 43 : $value.hashCode());
        return result;
    }

    public String toString() {
        return "SystemConfig(id=" + this.getId() + ", menuName=" + this.getMenuName() + ", value=" + this.getValue() + ", sort=" + this.getSort() + ", status=" + this.getStatus() + ")";
    }
}

